<%@ page import="com.ydgk.dao.SupplierDao" %>
<%@ page import="com.ydgk.bean.Supplier" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: zzz
  Date: 2019/10/5
  Time: 19:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>booksave</title>
    <link rel="stylesheet" type="text/css" href="css/booksave.css">
    <script language="javascript" type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
</head>
<body>
<%
    SupplierDao supplierDao = new SupplierDao();
    List<Supplier> list = supplierDao.findAll();
%>
<div>
<form action="BookSaveServlet.action">
    <input type="text" name="bname" placeholder="图书名字">
    <input type="text" name="bauthor" placeholder="图书作者">
    <input type="text" name="bprice" placeholder="单本价格">
    <input type="text" name="bdate" onclick="WdatePicker()" placeholder="出版日期">
    <select name="sid" id="sid">
        <option>出版社名字</option>
            <%for(int i =0;i<list.size();i++){%>
        <option value="<%= list.get(i).getSid()%>">
            <%= list.get(i).getSname()%>
        </option>
            <%}%>
    </select>
    <br><br>
    <input id="button" type="submit" value="添加">
</form>
</div>
</body>
<script src="js/jquery-2.1.1.min.js" type="text/javascript"></script>

<script>
    $(function () {
        $("select").css({width:"250px",
            "font-size": "18px",
            color: "#53e3a6",
            "text-align": "center",
            display: "block" ,
            border: "1px solid rgba(255, 255, 255, 0.4)" ,
            "background-color": "rgba(255, 255, 255, 0.2)" ,
            "border-radius": "3px" ,
            padding: "10px 15px" ,
            margin: "0 auto 10px auto",
            "font-family": "方正喵呜体"
        });
        $("option:gt(0)").css("color","darkmagenta");
    });
</script>
</html>
